package cn.edu.dz.thread02;

import cn.edu.dz.thread02.MyThread1;

public class Test01 {
    public static void main(String[] args) {
        //将继承Thread类的线程实例化
        Thread th = new MyThread("张三丰");
        //将实现runnable接口的线程实例化
        MyThread1 th2 = new MyThread1();
        th2.setTh(th);
        Thread th1 = new Thread(th2);
        //启动
        th.start();
        th1.start();
    }
}
